 <?php
  use yii\helpers\Html;
  use yii\helpers\Url;
  use yii\bootstrap\ActiveForm;
  use yii\widgets\LinkPager;

  $this->title = 'orderlist';
 ?>
<div class="box">
  <div class="box-header">
    <h3 class="box-title">订单列表</h3>
  </div>
  <!-- /.box-header -->
  <div class="box-body">
    <!-- <button type="button" class="btn btn-primary search_btn">搜索</button> -->
    <table id="example1" class="table table-bordered table-striped">
      <thead>
      <tr>
        <th>产品名称</th>
        <th>对接人</th>
        <th>订单归属地</th>
        <th>订单生成时间</th>
        <th>操作</th>
      </tr>
      </thead>
      <tbody>
      <?php foreach ($model as $val) :?>
      <tr>
        <td><?= $val->pname ?></td>
        <td><?= $employee[$val->customerorder->sid] ?></td>
        <td><?= $val->check_address?></td>
        <td><?= date('Y-m-d', $val->created_at)?></td>
        <td><a href="<?= Url::toRoute(['order/viewdetail', 'id' => $val->id])?>"><button class="btn btn-primary">订单详情</button></a></td>
      </tr>
      <?php endforeach;?>
      </tbody>
    </table>
  </div>
  <!-- /.box-body -->
  <?= LinkPager::widget(['pagination' => $pages]); ?>
</div>